package IO流;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

public class 读取配置文件 {
    public static void main(String[] args) throws IOException {
        //1.创建集合
        Properties pro=new Properties();
        //2.读取
        FileInputStream fos=new FileInputStream("F\\a.properties");
        pro.load(fos);
        fos.close();
        //3.打印集合
        System.out.println(pro);//{aaa=111, ccc=333, bbb=222, ddd=444}

    }
}
